package com.pll.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName SwaggerConfig
 * @Description TODO
 * @Author 小鹿
 * @Date 2025/6/12 10:40
 */
@Configuration
public class SwaggerConfig
{
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("饭团API文档")
                        .version("1.0.0")
                        .description("饭团API接口文档")
                        .termsOfService("https://www.example.com")
                        .contact(new io.swagger.v3.oas.models.info.Contact()
                                .name("技术支持")
                                .email("support@example.com")
                                .url("https://www.example.com"))
                        .license(new io.swagger.v3.oas.models.info.License()
                                .name("Apache 2.0")
                                .url("https://www.apache.org/licenses/LICENSE-2.0")));
    }
}